package com.hzw.saas.common.util;

import cn.hutool.core.lang.Snowflake;
import cn.hutool.core.util.IdUtil;

/**
 * <p>
 *
 * </p>
 *
 * @author sonam
 * @since 2021/5/8 17:58
 */
public class SnowFlakeUtil {

    /**
     * 派号器 workId：0~31
     * 机房 dataCenterId：0~31
     */
    public static final Snowflake instance = IdUtil.getSnowflake(1, 1);

    public static Long nextId() {
        return instance.nextId();
    }

    public static String nextIdStr() {
        return instance.nextIdStr();
    }
}
